# --------------------------------------------------------
#  Copyright (C) 2004-2020 by EMGU Corporation. All rights reserved.
# --------------------------------------------------------

IF(EMGU_CV_BUILD OR EMGU_CV_EXAMPLE_BUILD)

#PROJECT(Emgu.CV.Cuda)

#FILE(GLOB_RECURSE SRC_CV_CUDA RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cs")
#LIST(APPEND SRC_CV_CUDA ${CMAKE_CURRENT_SOURCE_DIR}/../CommonAssemblyInfo.cs)

#GENERATE_DOCUMENT(${LIBRARY_OUTPUT_PATH}/${PROJECT_NAME})
#SIGN_ASSEMBLY(${CMAKE_CURRENT_SOURCE_DIR}/../Emgu.CV.snk)
#SET_CS_TARGET_FRAMEWORK(${CSC_TARGET_FRAMEWORK})
#ADD_CS_REFERENCES("${LIBRARY_OUTPUT_PATH}/Emgu.Util.dll;${LIBRARY_OUTPUT_PATH}/Emgu.CV.dll")

#FILE(GLOB RESX_SRC 
#   "${CMAKE_CURRENT_SOURCE_DIR}/*.resx" 
#   "${CMAKE_CURRENT_SOURCE_DIR}/Properties/*.resx")
#FOREACH (RESX ${RESX_SRC})
#   STRING(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "${PROJECT_NAME}." RESOURCES_NAME ${RESX})
#   STRING(REPLACE ".resx" ".resources" RESOURCES_NAME ${RESOURCES_NAME})
#   STRING(REPLACE "/" "." RESOURCES_NAME ${RESOURCES_NAME})
#   ADD_CS_RESOURCES(${RESX} ${RESOURCES_NAME})
#ENDFOREACH(RESX)

#COMPILE_CS(${PROJECT_NAME} "library" "${SRC_CV_CUDA}" ALL)

#if(ENABLE_SOLUTION_FOLDERS)
#    set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "emgu")
#endif()

#ADD_DEPENDENCIES(${PROJECT_NAME} Emgu.CV Emgu.Util cvextern)
#INSTALL(
#FILES 
#${LIBRARY_OUTPUT_PATH}/${PROJECT_NAME}.dll 
#${LIBRARY_OUTPUT_PATH}/${PROJECT_NAME}.xml
#DESTINATION ${CPACK_PACKAGE_CLI_FOLDER}
#COMPONENT emgucv_binary)

#IF(WIN32 OR APPLE)

#IF(NETFX_CORE)
#  SET(CSPROJ_FILE "${PROJECT_NAME}.Windows.Store.csproj")
#ELSE()
#  SET(CSPROJ_FILE "${PROJECT_NAME}.csproj")
#ENDIF()

INSTALL(
  DIRECTORY
  ${CMAKE_CURRENT_SOURCE_DIR}
  DESTINATION .
    COMPONENT emgucv_source
  FILES_MATCHING 
  PATTERN "*.cs"
  PATTERN "*.shproj"
  PATTERN "*.projitems"
  PATTERN "*.resx"
  PATTERN ".svn" EXCLUDE
  PATTERN "obj" EXCLUDE
  PATTERN "CMakeFiles" EXCLUDE
  PATTERN "${PROJECT_NAME}.dir" EXCLUDE

)
#ENDIF()

ENDIF()
